package controller;


import com.alibaba.fastjson.JSON;
import pojo.admin;
import service.adminService;
import service.Impl.adminServiceImpl;
import servlet.BaseServlet;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/admin")
public class adminController extends BaseServlet {
    adminService adminService = new adminServiceImpl();
    public void getAdmin(HttpServletRequest request, HttpServletResponse response) throws IOException {
        admin admin = adminService.getAdmin(request, response);
        String jsonString = JSON.toJSONString(admin);
        response.getWriter().write(jsonString);
    }

}